<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<style type="text/css">
#resultDiv td {
	border: 1px solid #eeeeee;
}
</style>

<script src="resources/js/paging/paging.js"></script>
<script type="text/javascript">
$(function() {
	setPage({
		page: $("#pageNum").val(),
		totalCount: $("#totalCount").val(),
		naviId: "naviPage",
		funcName: "getContentsList",
		pageSize: pageSize
	});
});
</script>

</head>
<body>

<div id="resultDiv">
<!-- 히든 값 -->
<input type="hidden" id="pageNum" value="${pageNum }"/>
<input type="hidden" id="totalCount" value="${totalCount }"/>

<!-- 누적 Contents 등록 수 -->
<table cellspacing="0" cellpadding="12" style="text-align:center;">
	<tr class="table_title"><td>누적 Contents 등록 수</td></tr>
	<tr><td>${totalCount }</td></tr>
</table>
<br/>

<!-- Contents List -->
<h3>■ 등록된 Contents 리스트</h3>
<table cellpadding="7" cellspacing="0" style="border:1px solid #eeeeee;width:100%;text-align:center;">
	<tr class="table_title">
		<td>No.</td>
		<td>등록 날짜</td>
		<td>Title</td>
		<td></td>
		<td></td>
	</tr>
	
<c:if test="${fn:length(resultList) > 0 }">
	<c:forEach var="list" items="${resultList }">
		<tr>
			<td>${list.no }</td>
			<td>${list.regdate }</td>
			<td><a href="modifyContentsForm.ga?no=${list.no }">${list.title }</a></td>
			<td></td>
			<td></td>
		</tr>
	</c:forEach>
</c:if>

<c:if test="${fn:length(resultList) <= 0 }">
	<tr style="height:350px;">
		<td colspan="100%">리스트가 없습니다.</td>
	</tr>
</c:if>
</table>
<br/>
</div>

<c:if test="${fn:length(resultList) > 0 }">
<div id="naviPage" style="text-align:center;"></div>
</c:if>

</body>
</html>